package com.xx.controller;

import com.xx.service.DeleteProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Author : 徐闯 ssm_admin
 * @Date : 2021-05-13 15:05:43
 * @Description : 删除旅游产品的控制器
 **/
@Controller
public class DeleteProductController {
    @Autowired
    private DeleteProductService deleteProductService;
    @RequestMapping("/deleteOne")
    @ResponseBody
    public int deleteProduct(int id){
        return deleteProductService.deleteOneProduct(id);
    }

    @ResponseBody
    @RequestMapping("/deleteProducts")
    public int deleteProducts(int ids[]) {
        return deleteProductService.deleteProducts(ids);
    }

}
